# Contributor: fossdd <fossdd@pwned.life>
# Maintainer: fossdd <fossdd@pwned.life>
pkgname=dialect
pkgver=2.5.0
pkgrel=0
pkgdesc="Translation app for GNOME"
url="https://dialectapp.org/"
arch="noarch"
license="GPL-3.0-or-later"
depends="
	desktop-file-utils
	gstreamer
	libadwaita
	libsoup3
	py3-beautifulsoup4
	py3-dbus
	py3-gobject3
	py3-gst
	py3-gtts
	"
makedepends="
	blueprint-compiler
	gobject-introspection
	gstreamer-dev
	gtk4.0-dev
	libadwaita-dev
	libsoup3-dev
	meson
	py3-gobject3-dev
	"
checkdepends="appstream-glib"
subpackages="$pkgname-lang"
source="$pkgname-$pkgver.tar.gz::https://github.com/dialect-app/dialect/archive/refs/tags/$pkgver.tar.gz
	$pkgname-po-$pkgver.tar.gz::https://github.com/dialect-app/po/archive/refs/tags/$pkgver.tar.gz
	"

prepare() {
	default_prepare
	mv "$srcdir"/po-$pkgver/* "$srcdir"/dialect-$pkgver/po/
}

build() {
	abuild-meson . output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
3f5258955c96de9007674e27cb0d133ef17f9aae44fdd18536046659e607bb8fedf98964a1f5e979f73e8909324ac0991d16f0e33ad13e6662a71bd6eb011196  dialect-2.5.0.tar.gz
17d97fddcad6f9b3fbd804b135e4c5e358137c00d1931cbe16fcb87187e83be0ea93a84bd706498dc3c13007884cdc0927544c27b8ea392ab2b35f3eb63e40c2  dialect-po-2.5.0.tar.gz
"
